Skip to content

Conversation

@clubby789
Copy link
Contributor

@clubby789 clubby789 commented Nov 16, 2025

Fixes #149003

There is a TOCTOU when multiple threads attempt to delete the same file. Instead of pre-checking if the file exists, we can simply ignore NotFound errors.

@rustbot
Copy link
Collaborator

rustbot commented Nov 16, 2025

Some changes occurred in src/tools/compiletest

cc @jieyouxu

@rustbot rustbot added the A-compiletest Area: The compiletest test runner label Nov 16, 2025
@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Nov 16, 2025
@rustbot
Copy link
Collaborator

rustbot commented Nov 16, 2025

r? @Zalathar

rustbot has assigned @Zalathar.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jieyouxu
Copy link
Member

r? me @bors r+ rollup

@bors
Copy link
Collaborator

bors commented Nov 17, 2025

📌 Commit c287f6e has been approved by jieyouxu

It is now in the queue for this repository.

@rustbot rustbot assigned jieyouxu and unassigned Zalathar Nov 17, 2025
@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 17, 2025
Zalathar added a commit to Zalathar/rust that referenced this pull request Nov 17, 2025
… r=jieyouxu

compiletest: Avoid race condition in file deletion

Fixes rust-lang#149003

There is a TOCTOU when multiple threads attempt to delete the same file. Instead of pre-checking if the file exists, we can simply ignore `NotFound` errors.
bors added a commit that referenced this pull request Nov 17, 2025
Rollup of 6 pull requests

Successful merges:

 - #147760 ([Debugger Visualizers] Unify `*-gnu` and `*-msvc` enum output)
 - #148505 (add larger test for `proc_macro` `FromStr` implementations)
 - #148855 (Error if an autodiff user does not set lto=fat)
 - #148958 (Run codegen tests on a 32-bit target in PR CI)
 - #149004 (compiletest: Avoid race condition in file deletion)
 - #149008 (triagebot: remove jsha from notifications for rustdoc HTML)

r? `@ghost`
`@rustbot` modify labels: rollup
JaclynCodes added a commit to JaclynCodes/rust that referenced this pull request Nov 17, 2025
… r=jieyouxu

compiletest: Avoid race condition in file deletion

Fixes rust-lang#149003

There is a TOCTOU when multiple threads attempt to delete the same file. Instead of pre-checking if the file exists, we can simply ignore `NotFound` errors.
Zalathar added a commit to Zalathar/rust that referenced this pull request Nov 17, 2025
… r=jieyouxu

compiletest: Avoid race condition in file deletion

Fixes rust-lang#149003

There is a TOCTOU when multiple threads attempt to delete the same file. Instead of pre-checking if the file exists, we can simply ignore `NotFound` errors.
bors added a commit that referenced this pull request Nov 17, 2025
Rollup of 11 pull requests

Successful merges:

 - #148505 (add larger test for `proc_macro` `FromStr` implementations)
 - #148752 (Constify `ManuallyDrop::take`)
 - #148757 (Constify `mem::take`)
 - #148855 (Error if an autodiff user does not set lto=fat)
 - #148912 (add note to `lines` docs about empty str behavior)
 - #148958 (Run codegen tests on a 32-bit target in PR CI)
 - #148994 (Abi compatibility test cleanup)
 - #148999 (Tweak Motor OS linker preset, fix `remote-test-server` for Motor OS)
 - #149004 (compiletest: Avoid race condition in file deletion)
 - #149008 (triagebot: remove jsha from notifications for rustdoc HTML)
 - #149010 (compiletest: Remove the "wasm32-bare" alias for `wasm32-unknown-unknown`)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 8a04951 into rust-lang:main Nov 17, 2025
11 checks passed
@rustbot rustbot added this to the 1.93.0 milestone Nov 17, 2025
rust-timer added a commit that referenced this pull request Nov 17, 2025
Rollup merge of #149004 - clubby789:compiletest-delete-safe, r=jieyouxu

compiletest: Avoid race condition in file deletion

Fixes #149003

There is a TOCTOU when multiple threads attempt to delete the same file. Instead of pre-checking if the file exists, we can simply ignore `NotFound` errors.
github-actions bot pushed a commit to rust-lang/rustc-dev-guide that referenced this pull request Nov 17, 2025
Rollup of 11 pull requests

Successful merges:

 - rust-lang/rust#148505 (add larger test for `proc_macro` `FromStr` implementations)
 - rust-lang/rust#148752 (Constify `ManuallyDrop::take`)
 - rust-lang/rust#148757 (Constify `mem::take`)
 - rust-lang/rust#148855 (Error if an autodiff user does not set lto=fat)
 - rust-lang/rust#148912 (add note to `lines` docs about empty str behavior)
 - rust-lang/rust#148958 (Run codegen tests on a 32-bit target in PR CI)
 - rust-lang/rust#148994 (Abi compatibility test cleanup)
 - rust-lang/rust#148999 (Tweak Motor OS linker preset, fix `remote-test-server` for Motor OS)
 - rust-lang/rust#149004 (compiletest: Avoid race condition in file deletion)
 - rust-lang/rust#149008 (triagebot: remove jsha from notifications for rustdoc HTML)
 - rust-lang/rust#149010 (compiletest: Remove the "wasm32-bare" alias for `wasm32-unknown-unknown`)

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-compiletest Area: The compiletest test runner A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

compiletest tries to delete .stdout file twice when introducing revisions to the test

6 participants